Simulink® from The MathWorks, Inc. of Natick, Mass., is a platform for multi-domain simulation and model-based design of dynamic systems. Simulink® provides an interactive graphical environment and a customizable set of block libraries that enable users to accurately design, simulate, implement, and test control, signal processing, communications, and other time-varying systems. Stateflow® from The MathWorks, Inc. of Natick, Mass., is an interactive design and simulation tool for event-driven systems. Stateflow® provides the language elements required to describe complex logic in a natural, readable, and understandable form. Stateflow® is integrated with Simulink®, providing an efficient environment for designing embedded systems that contain control, supervisory, and mode logic.
Simulink® and Stateflow® are designed to operate on the foundation of MATAB® from The MathWorks, Inc. of Natick, Mass., which provides a technical computing environment. The technical computing environment provides a MATLAB® workspace consisting of the set of variables (named arrays) built up during a MATLAB® session and stored in memory. For example, if users type:
t=0:pi/4:2*pi; and
y=sin(t),
the MATLAB® workspace includes two variables, y and t, each having nine values.
A Simulink® model, defines its variables with various types and values of data. In Simulink®, which operates on the foundation of MATLAB®, the data associated with the variables of a block diagram model is stored in the MATLAB® workspace. Because the MATLAB® workspace is a global workspace that can contain data associated with other Simulink® models loaded in the modeling environment, the relationship between the block diagram model and the MATLAB® workspace is very loose.
In the conventional block diagram modeling environment, the loose relationship between a block diagram model and a global workspace makes it inefficient for the block diagram model to access and manipulate the data contained in the global workspace. Because the global workspace contains data associated with the entire block diagram modeling environment, it takes time to search data associated with a particular block diagram model. Therefore, it is desired to provide a workspace that has a closer relationship with a block diagram model to make it efficient for the block diagram model to access and manipulate the data contained in the workspace. In addition, it is needed that the model workspace enables the user to limit the scope/visibility of data such that certain data is only visible within the model in question and is not visible to other models within the block diagram modeling environment.